home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-03-07 | 2.7 KB | 105 lines | [TEXT/MPS ] |
-
- // ---- End Project Data ----
-
-
- // ---- File PhoneExpandoFun.t ----
-
- // Before Script for "myBase"
- // Copyright © 1993-4 by Apple Computer, Inc. All rights reserved.
-
- myBase :=
- {viewBounds: {top: 0, left: 0, right: 240, bottom: 336},
- declareSelf: 'base,
- title: "Phone Expando Test",
- viewSetupFormScript:
- func()
- begin
- local b := GetAppParams();
- constant kMaxAppWidth := 240;
- constant kMaxAppHeight := 336;
- viewBounds := RelBounds(b.appAreaTop, b.appAreaLeft,
- MIN(b.appAreaWidth, kMaxAppWidth), MIN(b.appAreaHeight, kMaxAppHeight));
- end,
- _proto: protoApp,
- debug: "myBase"
- };
-
-
- // Before Script for "myExpando"
- // Copyright © 1993-4 by Apple Computer, Inc. All rights reserved.
-
- myExpando := /* child of myBase */
- {
- viewSetupFormScript:
- func()
- begin
- self.target := self;
- self.lines := Clone(baseLines) ;
-
- phones := [] ;
- AddArraySlot(phones, SetClass(Clone("800 555-1212"), 'workPhone));
- AddArraySlot(phones, SetClass(Clone("408 555-1212"), 'homePhone));
-
- // add protos (based on protoPhoneExpando) to proto shell
- :AddItem({_proto: pt_myPhoneExpando});
- :AddItem({_proto: pt_myPhoneExpando, phoneIndex: 1});
- end,
- flushEdits:
- func()
- begin
- // don't need to do anything to save, just a demo!
- nil
- end,
- lines: nil,
- numlines: 2,
- editWidth: 200,
- editHeight: 50,
- deleteThis: "delete",
- viewBounds: {top: 24, left: 8, right: 232, bottom: 296},
- baseLines:
- // just some defaults, from protoExpandoShell...
-
- [{_proto: protoTextExpando,
- label: "Override",
- path: 'deleteThis,
- entryFlags: (1 << 0) + (65535 << 9)},
- {_proto: protoTextExpando,
- label: "These",
- path: 'deleteThis,
- entryFlags: (1 << 0) + (65535 << 9)}],
- phones: nil,
- AddItem:
- func(theItemProto)
- begin
- AddArraySlot(lines, Clone(theItemProto));
- numLines := numLines + 1;
-
- // if the view is displayed, then update the children
- if GetView(self) then
- :RedoChildren();
- end,
- _proto: protoExpandoShell,
- debug: "myExpando"
- };
- // View myExpando is declared to myBase
-
-
-
-
- // ---- Beginning of non-used User Protos ----
-
- // ---- File myPhoneExpando ----
-
- // Before Script for "_userproto000"
- // Copyright © 1993-4 by Apple Computer, Inc. All rights reserved.
-
- _userproto000 := {phoneIndex: 0, path: 'phones, _proto: protoPhoneExpando};
-
-
- // ---- End of non-used User Protos ----
-
-
-
- // ---- Beginning of section for non used Layout files ----
-
- // End of output